home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / misc / amigancp19.lha / AmigaNCP19 / Install-AmigaNCP < prev    next >
Text File  |  1996-10-27  |  6KB  |  254 lines

  1. ; Installer-Script for AmigaNCP
  2. ;
  3. ; $VER: AmigaNCP-Install 1.1 (26.10.96)
  4. ;
  5.  
  6. ;
  7. ; Strings
  8.  
  9. (set #startup-msg
  10. (cat    "\nWelcome to AmigaNCP Release 1.9\n===============================\n\n"
  11.         "© 1993-96 Oliver Wagner\n<owagner@vapor.com>\nAll Rights Reserved\n\n"
  12.         "Internet support:\n"
  13.         "http://www.vapor.com/support/amigancp/\n"
  14.         "ftp: ftp.vapor.com, /support/amigancp/"
  15. ))
  16.  
  17. (set #install-msg
  18. (cat    "Installing AmigaNCP Release 1.9\n\n"
  19.         "Where do you want AmigaNCP be installed?\nA drawer named"
  20.         "'AmigaNCP' will be automatically created."
  21. ))
  22.  
  23. (set #copylib-msg "Installing amigancp.library")
  24. (set #copylib-where "Please select a directory for \"amigancp.library\".")
  25. (set #copycat-msg "Installing catalogs")
  26. (set #copycat-where "Please select a directory for the language catalogs.")
  27. (set #copyserv-msg "Installing NCP Services")
  28. (set #copydoc-msg "Installing Docs")
  29. (set #copytools-msg "Installing Tools")
  30. (set #copyreg-msg "Installing Registration Utility")
  31. (set #copyicons-msg "Installing Default Icon Tree")
  32. (set #copysub-msg "Installing Submission Material")
  33.  
  34. (set #wantdev-msg 
  35. (cat    "Do you want to install the Developer\n"
  36.         "Documentation and associated support files?\n\n"
  37.         "These files are needed only when you want\n"
  38.         "to develop applications using \"amigancp.library\"\n"
  39.         "or want to do a catalog translation to another\n"
  40.         "language.\n"
  41. ))
  42. (set #copydev-msg "Copying Developer files")
  43. (set #whats "What Psion computer do you own?\n\nThis choice will determine the baud rate used\nto access the serial port")
  44. (set #need20 "AmigaNCP requires OS 2.04 or better!" )
  45.  
  46. (set #setpatchold "WARNING!\n========\nYour SetPatch Version %ld.%ld is TOO OLD!\n\nYou MUST at least have version 40.16 installed\nfor AmigaNCP to work properly, otherwise you\nwill experience crashes and memory losses!\n\nThe current version of SetPatch is included on the AmigaNCP registration disk or available from the Vapor support sites.")
  47.  
  48. ;
  49. ; Determine if running on an 68020++
  50. ;
  51. (procedure checkv20
  52.     (if (>= (database "cpu") 68020 )
  53.         (set v20-flag 1)
  54.     )
  55. )
  56.  
  57. ;
  58. ; Check for SetPatch 40.16 or higher
  59. ;
  60.  
  61. (procedure verifysetpatch
  62. (
  63.     (set vernum (getversion "C:SetPatch"))
  64.     (set ver (/ vernum 65536 ) )
  65.     (set rev (- vernum (* ver 65536 ) ) )
  66.     (if ( OR ( (> ver 40) (AND ( = ver 40 ) ( >= rev 16 ) ) ) )
  67.         (set setpatchok 1)
  68.         (message (#setpatchold ver rev ) )
  69.     )
  70. ))
  71. ;
  72. ;
  73. ; GO!
  74. ;
  75. ;
  76. (set vernum (getversion "LIBS:version.library"))
  77. (set ver (/ vernum 65536 ) )
  78. (set rev (- vernum (* ver 65536 ) ) )
  79.  
  80. (if (< ver 37 )
  81. (
  82.     (abort #need20)
  83. ))
  84. (set olduserlevel (user 1))
  85. (message #startup-msg)
  86. (user olduserlevel)
  87. (welcome)
  88. (set default-dest
  89.     (askdir
  90.         (prompt #install-msg)
  91.         (help @askdir-help)
  92.         (default @default-dest)
  93.     )
  94. )
  95. (complete 1)
  96. (set @default-dest
  97.     (tackon default-dest "AmigaNCP")
  98. )
  99. (complete 2)
  100. (set olduserlevel (user 1))
  101. (verifysetpatch)
  102. (user olduserlevel)
  103. (complete 3)
  104. (makedir @default-dest (infos))
  105. (makedir (tackon @default-dest "Docs" ) (infos))
  106. (makedir (tackon @default-dest "Tools" ) (infos))
  107. (makedir (tackon @default-dest "Submissions" ) (infos))
  108. (makedir (tackon @default-dest "Registration" ) (infos))
  109. (makedir (tackon @default-dest "Icons" ))
  110. (complete 2)
  111. ;
  112. ; Copy lib
  113. ;
  114. (set #libname "libs/amigancp.library")
  115. (checkv20)
  116. (if v20-flag
  117. (
  118.     (set #libname "libs/amigancp.library.020")
  119. ))
  120. (copyfiles
  121.     (help @copyfiles-help)
  122.     (prompt #copylib-msg)
  123.     (confirm)
  124.     (source #libname)
  125.     (newname "amigancp.library")
  126.     (dest
  127.         (askdir
  128.             (prompt #copylib-where)
  129.             (help @askdir-help)
  130.             (default "LIBS:")
  131.         )
  132.     )
  133. )
  134. (complete 10)
  135. (if (> ver 37 )
  136. (
  137.     (copyfiles
  138.         (source "Catalogs")
  139.         (prompt #copycat-msg)
  140.         (help @copyfiles-help)
  141.         (dest "LOCALE:Catalogs")
  142.         (confirm)
  143.         (all)
  144.     )
  145. ))
  146. (complete 20)
  147. (copyfiles
  148.     (source "")
  149.     (pattern "AmigaNCP#?")
  150.     (prompt #copyserv-msg)
  151.     (help @copyfiles-help)
  152.     (confirm)
  153.     (infos)
  154.     (dest @default-dest)
  155. )
  156. (complete 34)
  157. (copyfiles
  158.     (source "Icons")
  159.     (prompt #copyicons-msg)
  160.     (help @copyfiles-help)
  161.     (dest (tackon @default-dest "Icons" ) )
  162.     (all)
  163.     (infos)
  164. )
  165. (complete 36)
  166. (copyfiles
  167.     (source "Submissions")
  168.     (prompt #copysub-msg)
  169.     (help @copyfiles-help)
  170.     (dest (tackon @default-dest "Submissions" ) )
  171.     (all)
  172.     (infos)
  173. )
  174. (complete 38)
  175. (delete (tackon @default-dest "Icons.info" ))
  176. (complete 39)
  177. (foreach "" "AmigaNCP#?"
  178.     (tooltype (
  179.         (dest (tackon @default-dest @each-name ) )
  180.         (noposition)
  181.     )
  182. ))
  183. (complete 40)
  184. (copyfiles
  185.     (source "Docs")
  186.     (prompt #copydoc-msg)
  187.     (help @copyfiles-help)
  188.     (confirm)
  189.     (infos)
  190.     (all)
  191.     (dest (tackon @default-dest "Docs" ) )
  192. )
  193. (complete 60)
  194. (copyfiles
  195.     (source "Tools")
  196.     (prompt #copytools-msg)
  197.     (help @copyfiles-help)
  198.     (confirm)
  199.     (infos)
  200.     (all)
  201.     (dest (tackon @default-dest "Tools" ) )
  202. )
  203. (complete 70)
  204. (copyfiles
  205.     (source "Registration")
  206.     (prompt #copyreg-msg)
  207.     (help @copyfiles-help)
  208.     (confirm)
  209.     (infos)
  210.     (all)
  211.     (dest (tackon @default-dest "Registration" ) )
  212. )
  213. (complete 80)
  214. (if (askbool
  215.         (prompt #wantdev-msg)
  216.         (help #wantdev-msg)
  217.         (default 1)
  218.     )
  219. (
  220.     (set devdir (tackon @default-dest "Developer"))
  221.     (makedir devdir (infos))
  222.     (copyfiles
  223.         (source "Developer")
  224.         (prompt #copydev-msg)
  225.         (help @copyfiles-help)
  226.         (dest devdir)
  227.         (confirm)
  228.         (infos)
  229.         (all)
  230.     )
  231. ))
  232. (complete 90)
  233. (if ( = (exists "ENV:NCP.config") 0 )
  234. (
  235.     (set s3amode (askchoice
  236.         (choices "Psion S3 (or HC) - 9600 baud" "Psion S3a (or MC) - 19200 baud" "Psion S3c and slow Amiga - 38400 baud" "Psion S3c - 57600 baud" )
  237.         (default 0 )
  238.         (prompt #whats)
  239.         (help @askchoice-help)
  240.     ))
  241.     (set baud 9600)
  242.     (if ( = 1 s3amode ) (set baud 19200))
  243.     (if ( = 2 s3amode ) (set baud 38400))
  244.     (if ( = 3 s3amode ) (set baud 57600))
  245.     (textfile 
  246.         (dest "ENV:NCP.config")
  247.         (append ( "DEVICE=serial.device UNIT=0 BAUD=%ld" baud ) )
  248.     )
  249.     (run "copy ENV:NCP.config ENVARC:NCP.config")
  250. ))
  251. (complete 100)
  252.